<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>两行四列布局</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f4f4f4;
        }
        .container {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-gap: 10px;
            width: 80%;
            background: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        .item {
            display: flex;
            justify-content: center;
            align-items: center;
            background: #e0e0e0;
            border-radius: 5px;
            padding: 20px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .item:hover {
            background: #d0d0d0;
        }
        .fa {
            font-size: 24px;
        }
    </style>
    <script src="../login/loginout/js/jquery-1.11.0.min.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">

</div>
<script>
 let len = 10;
 for(let i=0;i<len;i++){
     let item = document.createElement("a");
     item.setAttribute("href","https://example.com");
     item.setAttribute("class","item");
     item.setAttribute("target","_blank");
     item.innerHTML = `<i class="fa fa-heart">第${i+1}序列</i>`;
     document.querySelector(".container").appendChild(item);
 }
</script>
</body>
</html>
